import request from '@/utils/request'

export function categoryGetOne() {
  return request({
    url: '/category/getOne',
    method: 'get'
  })
  // 获取商品一级分类
}

export function categoryGetTwo(params) {
  return request({
    url: '/category/getTwo',
    method: 'get',
    params
  })
  // 根据一级分类id获取二级分类
}
export function categoryModify(data) {
  return request({
    url: '/category/modify',
    method: 'post',
    data
  })
  // 新增或修改一级（二级）分类
}
export function categoryDelete(params) {
  return request({
    url: '/category/delete',
    method: 'delete',
    params
  })
  // 删除一级或二级分类
}
